module.exports = class extends think.Model {
  queryData({page = 1, limit = 10, title = '', field = '*'}) {
    const where = {};
    if (where) {
      where.title = title;
    }
    return this.where(where).page(page, limit).field(field).select();
  }
  removeById(platformId, id) {
    return this.where({
      platform_id: platformId,
      id
    }).delete();
  }
  updateById(platformId, id, data) {
    return this.where({
      platform_id: platformId,
      id
    }).update(data);
  }
};
